package hku.cs.lunuo.rank;

import org.jdom.Element;

public class StatisticProperty{
	Label label = null;
	TFTimes tfs = new TFTimes();
	
	
	public StatisticProperty(Label label, TFTimes tfs) {
		super();
		this.label = label;
		this.tfs = tfs;
	}


	public StatisticProperty() {
	}


	public void add(boolean b) {
		tfs.add(b);
	}
	
	public void toXML(Element xml) {
		if(label!=null)
			label.toXML(xml);
		
		Element xtf = new Element("tftimes");
		xtf.setAttribute("true", String.valueOf(tfs.getTruTimes()));
		xtf.setAttribute("false", String.valueOf(tfs.getFlsTimes()));
		
		xml.addContent(xtf);
		
	}
}